<template>
	<view class="container">
		<view class="account">
			<text class="another">对方账户</text>
			<input class="input" type="text" placeholder="VS账号/手机号码" @input="inputmoney" v-model="moment" />
		</view>
		<view class="text">钱实时转入对方账户，无法退款</view>
		<view class="t-apply" :class="{'t-apply-moment':flag}" @click="next">下一步</view>
	</view>
</template>

<script>
	import {selectAccount} from '../../api/user.js'
	export default {
		data(){
			return{
				moment:'',
				flag:false
			}
		},
		onNavigationBarButtonTap(){
			uni.navigateTo({
				url:"/pages/transfer/zhangdan"
			})
		},
		onLoad(){
			if(uni.getStorageSync("yunbi").gradeName==''|| uni.getStorageSync("yunbi").gradeName==undefined){
				this.msg('非VIP会员不可转账','none')
				setTimeout(()=>{
					uni.navigateBack({
						delta:1
					})
				},1500)
			}
		},
		methods:{
			inputmoney(){
				if(this.moment.trim()!=""){
					this.flag=true;
				}else{
					this.flag=false;
				}
				console.log(123)
			},
			next(option){
				this.get(selectAccount,{userAccount:this.moment}).then(res=>{
					console.log(res);
					// if(res.data.gradeName==''|| res.data.gradeName==undefined){
					// 	this.msg('对方为非会员，不可转账','none')
					// }else{
						uni.navigateTo({
							url:'/pages/transfer/transferanother?userAccount='+this.moment
						})
					// }
				})
			},
		}
	}
</script>

<style>
	.container{
		padding: 0 30rpx;
	}
	.account{
		width: 690rpx;
		margin: 80rpx auto 0;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #D5D5D5;
		padding-bottom: 20rpx;
	}
	.another{
		font-size: 28rpx;
		font-weight: 300;
		color: #333333;
		margin-right: 33rpx;
	}
	.input{
		font-size: 28rpx;
		font-weight: 300;
		color: #CACACA;
	}
	.text{
		font-size: 24rpx;
		font-weight: 300;
		color: #666666;
		margin-top: 20rpx;
	}
	.t-apply{
		width: 460rpx;
		height: 88rpx;
		background: #F0812D;
		opacity: 0.3;
		border-radius: 8rpx;
		margin: 68rpx auto;
		font-size: 30rpx;
		font-weight: 400;
		line-height: 88rpx;
		color: #FFFFFF;
		text-align: center;
	}
	.t-apply-moment{
		background: #F0812D;
		opacity: 1;
	}
</style>
